import React from "react";

import classNames from 'classnames';

import splitObject from 'fly';

export default function StepLine(props){
    let defualtProps = {
        profixCls:"create_proofing_title",
        isAlarm:true  // 默认为必须 , 前面带星号
    };
    props = Object.assign({},defualtProps,props);

    const profixCls = props.profixCls;

    const spanClassName = classNames({
        [`${profixCls}-content`]:true
    });

    const desClassName = classNames({
        [`${profixCls}-des`]:true
    });

    const isAlarm = !!props.isAlarm;

    return (
        <div className={profixCls}>
            <span className={spanClassName}>
                <h4 data-alarm={isAlarm} {...props}> {props.title} : </h4>
            </span>
            {
                isAlarm && <span className={desClassName}>
                {props.des}
            </span>
            }

        </div>
    )
}